1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class Converter {
6
7     
public static string ToChessCoords(int row, int col) {
8         
return "" + ToChessCol(col) + ToChessRow(row);
9     }
10
11     
public static char ToChessRow(int row) {
12         
char cRow = '1';
13         
int iRow = cRow + row;
14         
return (char) iRow;
15     }
16
17     
public static char ToChessCol(int col) {
18         
char cCol = 'a';
19         
int iCol = cCol + col;
20         
return (char) iCol;
21     }
22
23     
public static Ray ScreenPointToRay(Vector3 pointPosition) {
24         
return GameManager.Instance.MainCamera.ScreenPointToRay(pointPosition);
25     }
26 }


Gõ tìm kiếm nhanh...